package com.seplayer.dao;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;

public class FileHelper {
	public byte[] getDataByPath(String path){
		return null;
	}
	public void output(byte[] data,String path){
		File f=new File(path);
		FileOutputStream fos;
		try {
			fos = new FileOutputStream(f);
			fos.write(data);
			fos.flush();
			fos.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}
	public byte[] input(String path){
		File f=new File(path);
		byte[] data=null;
		try {
			FileInputStream fis=new FileInputStream(f);
			data=new byte[(int) f.length()];
			fis.read(data);
			fis.close();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return data;
	}
}
